<template>
	<view class="content">
		<uni-grid :column="3" :highlight="true">
			<uni-grid-item v-for="(item, index) in list" :index="index" :key="index">
				<view class="grid-item-box" @click="toMuyu(item.url)">
					<text class="text">{{ item.text }}</text>
				</view>
			</uni-grid-item>
		</uni-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						url: '/pages/taoism/fish/fish3',
						text: '木鱼',
						badge: '0',
						type: "primary"
					},
					{
						url: '/pages/taoism/beads',
						text: '佛珠',
						badge: '1',
						type: "success"
					},
					{
						url: '/pages/taoism/chime',
						text: '磬',
						badge: '99',
						type: "warning"
					},
					{
						url: '/pages/document/index',
						text: '资料库',
						badge: '99',
						type: "warning"
					},
					{
						url: '/pages/music/albums',
						text: '音乐',
						badge: '99',
						type: "warning"
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			toMuyu(url) {
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style>
	.grid-item-box {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}
</style>